home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 1
/
Amiga Tools.iso
/
egs-tools
/
egs_demo-version
/
egs_devels
/
doc
/
egsrequest.doc
< prev
next >
Wrap
Text File
|
1994-06-06
|
9KB
|
390 lines
/*
* $
* $ FILE : egsrequest.doc
* $ VERSION : 1
* $ REVISION : 1
* $ DATE : 08-Feb-93 10:06
* $
* $ Author : mvk
* $
*
*
* (c) Copyright 1990/93 VIONA Development
* All Rights Reserved
*
*/
egsrequest.library/ER_CancelRequest
egsrequest.library/ER_ChangeRequestPos
egsrequest.library/ER_ChangeRequestSize
egsrequest.library/ER_CreateFileReq
egsrequest.library/ER_CreateReqContext
egsrequest.library/ER_CreateSimpleRequest
egsrequest.library/ER_DeleteReqContext
egsrequest.library/ER_DeleteRequest
egsrequest.library/ER_DoRequest
egsrequest.library/ER_FindRequest
egsrequest.library/ER_IterateRequest
egsrequest.library/ER_OpenRequest
egsrequest.library/ER_PutValuesInFileReq
egsrequest.library/ER_CancelRequest
NAME
ER_CancelRequest cancels pending request
SYNOPSIS
ER_CancelRequest(req);
A0
ER_RequestPtr req;
FUNCTION
Cancels a pending request. The associated window is closed. The requester
structure is NOT freed. If the requester is not currently in use this is
a no operation.
INPUTS
req : request to be canceled
RETURNS
egsrequest.library/ER_ChangeRequestPos
NAME
ER_ChangeRequestPos Moves a requester
SYNOPSIS
ER_ChangeRequestPos(req, x, y);
A0 D0 D1
ER_RequestPtr req;
WORD x,y;
FUNCTION
Moves a requester to the absolute location x/y. If the requester is not
currently open, it will open up on this position the next time it is
used.
INPUTS
req : requester to be moved
x,y : absolute destination location
RETURNS
egsrequest.library/ER_ChangeRequestSize
NAME
ER_ChangeRequestSize Resizes a requester
SYNOPSIS
ER_ChangeRequestSize(req, w, h);
A0 D0 D1
ER_RequestPtr req;
WORD x,y;
FUNCTION
Changes the size of a requester to the given dimensions. The values are
clipped to the maximum and minimum requester size, so no harm can be
done. If the requester is not currently open, it will open up in this
size the next time it is used.
INPUTS
req : requester to be resized
w,h : new width and height
RETURNS
egsrequest.library/ER_CreateFileReq
NAME
ER_CreateFileReq create an filerequester
SYNOPSIS
freq = ER_CreateFileReq(con);
D0 A0
ER_FileRequestPtr freq;
ER_ReqContextPtr con;
FUNCTION
Creates a filerequester, associated to the given requester context, or to
none if 'con' equals NULL. The requester is not immediately opened. You can
open it using 'ER_OpenRequest' or 'ER_DoRequest'. If the request is finished
you find the results in the appropriate structure elements. (see the includes
for more information)
You may reuse a file requester as often as you like.
INPUTS
con : Requester context, in which the filerequest shall become a member.
If NULL, the requester will be a free citizen.
RETURNS
freq : a fully initialized file requester
egsrequest.library/ER_CreateReqContext
NAME
ER_CreateReqContext create a requester context
SYNOPSIS
con = ER_CreateReqContext();
D0
ER_ReqContextPtr con;
FUNCTION
Creates a requester context. You can use it, to keep track of your requester
and make life much easier.
INPUTS
RETURNS
con : an initialized requster context
egsrequest.library/ER_CreateSimpleRequest
NAME
ER_CreateSimpleRequest creates a simple requester
SYNOPSIS
sreq = ER_CreateSimpleRequest(con, texts, selects);
D0 A0 A1 A2
ER_SimpleRequestPtr sreq;
ER_ReqContext con;
char *text;
char *selects;
FUNCTION
Creates a simple requester. Such a requester is build out of an information
field and a number of action gadgets. The text and the names of the gadgets
are defined in strings. Lines/Gadgets can be separated by "|". After the
request is finished, the number of the chosen gadget is found in the
requester structure. The gadgets are numbered from left to right, starting
with 0 for the first gadget.
The requester is not instantly opened. It can be displayed using
'ER_DoRequest' or 'ER_OpenRequest'.
You may reuse a simple requester as often as you like.
EXAMPLE
An call of
... ER_CreateSimpleRequest(NULL,"This is not|a known file|format",
"Retry|Define|Cancel");
will result in a requester shaped like this:
###---------------------###-###
###---------------------###-###
|+---------------------------+|
|| This is not ||
|| a known file ||
|| format. ||
|+---------------------------+|
|+-------++--------++--------+|
|| Retry || Define || Cancel ||
|+-------++--------++--------+|
+-----------------------------#
INPUTS
con : Requester context, in which the simple request shall become a member.
If NULL, the requester will be a free citizen.
texts : contents of the body text.
selects: names of the gadgets
RETURNS
sreq : a fully initialized simple request structure
egsrequest.library/ER_DeleteReqContext
NAME
ER_DeleteReqContext delete a requester context
SYNOPSIS
ER_DeleteReqContext(con)
A0
ER_ReqContextPtr con;
FUNCTION
Deletes a requester context AND ALL associated requesters. Pending requesters
are canceled, so make sure not to wait for them to finish or to reuse them.
You can keep track of your requesters in a requester context, and use this
function to delete them all in case of fire or exit.
INPUTS
con : the requester context to be deleted
RETURNS
egsrequest.library/ER_DeleteRequest
NAME
ER_DeleteRequest delete a requester
SYNOPSIS
ER_DeleteRequest(req)
A0
ER_RequestPtr req;
FUNCTION
Deletes a requester (any kind). If the request is still pending, it is
canceled and the window closed.
INPUTS
req : the requester to be deleted
RETURNS
egsrequest.library/ER_DoRequest
NAME
ER_DoRequest open and start a request
SYNOPSIS
done = ER_DoRequest(req)
D0 A0
BOOL done;
ER_RequestPtr req;
FUNCTION
Opens a request, and starts to handle it events. This call does only return
if the requester was not successfully opened, or after the request is
finished.
INPUTS
req : requester to be requested
RETURNS
done : true, if the request was successfull
egsrequest.library/ER_FindRequest
NAME
ER_FindRequest find a request in a context
SYNOPSIS
req = ER_FindRequest(con, msg)
D0 A0 A1
ER_RequestPtr req;
ER_ReqContextPtr con;
EI_EIntuiMsgPtr msg;
FUNCTION
Searches in a request context for a requester, that fits to the message.
If none is found this call returns NULL. You can use this function to
easily determine for which requester (or none at all) the message was
send.
INPUTS
con : a requester context, that may contain the requester
msg : a message that might be for a requester
RETURNS
req : the fitting requester or NULL if none fits
egsrequest.library/ER_IterateRequest
NAME
ER_IterateRequest iterates a requester
SYNOPSIS
notFinished = ER_IterateRequest(req, msg);
D0 A0 A1
BOOL notFinished;
ER_RequestPtr req;
EI_EIntuiMsgPtr msg;
FUNCTION
Iterates a requester according to an intui message. If it is called with
a NULL requester, or a message that does not fit to the requester, this
is a no operation. If the message terminates the requester (e.g 'OK') this
function will return false.
INPUTS
req : a requester that should fit to the message
msg : an intui message received through the main port
RETURNS
notFinished : false if the requester is terminated
egsrequest.library/ER_OpenRequest
NAME
ER_OpenRequest open a request an return
SYNOPSIS
success = ER_OpenRequest(req, win);
D0 A0 A1
BOOL success;
ER_RequestPtr req;
EI_WindowPtr win;
FUNCTION
Opens a requester and returns immediately. If the requester could not
be opened (for any reasons) this call returns false. You have to iterate
the request by using 'ER_IterateRequest'. If you supply a window, the
requester will share its port and screen.
The requester is closed, if the iteration yields in a termination, or
a call to 'ER_CancelRequest'.
If the requester is allready open, this is a no operation.
INPUTS
req : requester to be opened
win : a window, to share its port and screen, or NULL for the
port and screen defined in the request structure
RETURNS
success : true if the requester couldt be opened
egsrequest.library/ER_PutValuesInFileReq
NAME
ER_PutValuesInFileReq put values in file requester
SYNOPSIS
ER_PutValuesInFileReq(freq, name, path, pattern);
A0 A1 A2 A3
ER_FileRequestPtr freq;
char *name, *path, *pattern;
FUNCTION
Changes the name, path and/or pattern values of a file requester. If the
requester is opened, the change takes place immediately, otherwise the
requester will pop up with the new values, the next time it is used.
NULL values for either parameter will not affect the original values.
INPUTS
freq : the filerequester to be changed
name : a new name string or NULL
path : a new path string or NULL
pattern : a new pattern string or NULL
RETURNS